from PIL import Image
from datetime import datetime

img = Image.open('C:/Users/004121/Desktop/图片/11.jpg')
print(img)

new_img = img.resize((500,750))
print(new_img.size)


nowtime = datetime.now().strftime("%Y-%m-%d %H-%M-%S")

new_img.save(f'C:/Users/004121/Desktop/图片/{nowtime}.jpg')